<template>
  <div>
    <el-table :data="productList" 
    v-loading.body="listLoading" element-loading-text="Loading" 
    border fit highlight-current-row>
      <el-table-column align="center" label='选择全部' width="80">
        <template slot-scope="scope">
        <el-checkbox ></el-checkbox>
        </template>
      </el-table-column>
      <el-table-column label="在售商品">
        <template slot-scope="scope">
          <el-row type="flex" justify="left">
            <el-col :span="5"><img :src="productImg"></el-col>
            <el-row :span="9">{{scope.row.product_name}}</el-row>
          </el-row>
        </template>
      </el-table-column>
      <el-table-column label="价格" width="110" align="center">
        <template slot-scope="scope">
          {{scope.row.price}}
        </template>
      </el-table-column>
      <el-table-column label="库存" width="110" align="center">
        <template slot-scope="scope">
          <span>{{scope.row.stock}}</span>
        </template>
      </el-table-column>
      <el-table-column align="center" label="操作" width="150">
        <template slot-scope="scope">
          <el-row>
            <el-button type="text" size="mini" @click="dialogVisibleTrue" round>编辑</el-button>
            <el-button type="text" size="mini" round>删除</el-button>
          </el-row>
        </template>
      </el-table-column>
    </el-table>
  </div>
</template>

<script>
export default {
  props: {
    productList: {
      type: Array
    },
    activeName: {
      type: String
    }
  }
}
</script>

<style scoped>

</style>